package com.ruoyi.web.controller.test;
//代理对象CarMoveLogProxy
public class CarMoveLogProxy implements Movable{
    Movable carMove;
    public CarMoveLogProxy(Movable carMove) {
        this.carMove = carMove;
    }
    @Override
    public void move() {
        System.out.println("汽车启动~~~~");
        carMove.move();
        System.out.println("汽车停止~~~~");
    }

    public static void main(String[] args) {
        final CarMoveLogProxy carMoveLogProxy = new CarMoveLogProxy(new CarMove());
        carMoveLogProxy.move();
    }
    
}
